Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tvheadend: fix path to ffmpeg(7) #6303

Merged
merged 5 commits into from
Dec 15, 2024
Merged

Conversation

hgy59
Copy link
Contributor

@hgy59 hgy59 commented Nov 3, 2024

Description

Fix for tvheadend to find ffmpeg(7) in the path.
Might solve the issue #6301.

Fixes #

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Bug fix

- incr. package revision
- avoid variable in DEPENDS (for SynoCommunity#6255)
- restore ownership of package directories for SRM/DSM < 7
Copy link
Contributor

@th0ma7 th0ma7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hgy59
Copy link
Contributor Author

hgy59 commented Nov 8, 2024

just waiting for feedback #6301 (comment)

@meeuuh92
Copy link

meeuuh92 commented Nov 9, 2024

just waiting for feedback #6301 (comment)

I've downloaded the test package. I will test tomorow

I'm sorry.. i don't know if i do something wrong (or if my DSM 6.2.4 is buggy but it doesn't work

For ffmpeg update :

2024/11/10 10:35:02     upgrade ffmpeg7 7.0.2-1 Begin start-stop-status stop
2024/11/10 10:35:02     upgrade ffmpeg7 7.0.2-1 End start-stop-status stop ret=[0]
2024/11/10 10:35:03     upgrade ffmpeg7 7.0.2-1 Begin preupgrade
2024/11/10 10:35:03     Begin initialize_variables
2024/11/10 10:35:03     End initialize_variables
2024/11/10 10:35:03     ===> Step preupgrade. STATUS=UPGRADE USER= GROUP= SHARE_PATH=
2024/11/10 10:35:04     /bin/cp: cannot stat '/volume1/@appstore/ffmpeg7/var/.': No such file or directory
2024/11/10 10:35:04     upgrade ffmpeg7 7.0.2-1 End preupgrade ret=[0]
2024/11/10 10:35:04     upgrade ffmpeg7 7.0.2-1 Begin preuninst
2024/11/10 10:35:04     Begin initialize_variables
2024/11/10 10:35:04     End initialize_variables
/var/packages/ffmpeg7/scripts/preuninst: line 3: /tmp/synopkgmgr.log-ffmpeg7: Permission denied
2024/11/10 10:35:04     upgrade ffmpeg7 7.0.2-1 End preuninst ret=[1]
2024/11/10 10:35:04     upgrade ffmpeg7 7.0.2-1 Begin /bin/rm -rf /volume1/@tmp/pkginstall
2024/11/10 10:35:04     upgrade ffmpeg7 7.0.2-1 End /bin/rm -rf /volume1/@tmp/pkginstall ret=[0]
2024/11/10 10:38:07     start ffmpeg7 7.0.2-1 Begin start-stop-status start
2024/11/10 10:38:07     start ffmpeg7 7.0.2-1 End start-stop-status start ret=[0]

For tvheadend version 40 :

2024/11/10 10:39:49     upgrade tvheadend 4.3.20240904-38 Begin start-stop-status stop
2024/11/10 10:39:52     upgrade tvheadend 4.3.20240904-38 End start-stop-status stop ret=[0]
2024/11/10 10:39:53     upgrade tvheadend 4.3.20240904-38 Begin preupgrade
2024/11/10 10:39:53     Begin initialize_variables
2024/11/10 10:39:53     End initialize_variables
2024/11/10 10:39:53     ===> Step preupgrade. STATUS=UPGRADE USER=tvheadend GROUP=sc-media SHARE_PATH=
2024/11/10 10:40:05     upgrade tvheadend 4.3.20240904-38 End preupgrade ret=[0]
2024/11/10 10:40:05     upgrade tvheadend 4.3.20240904-38 Begin preuninst
2024/11/10 10:40:05     Begin initialize_variables
2024/11/10 10:40:05     End initialize_variables
2024/11/10 10:40:05     ===> Step preuninst. STATUS=UPGRADE USER=tvheadend GROUP=sc-media SHARE_PATH=
2024/11/10 10:40:05     upgrade tvheadend 4.3.20240904-38 End preuninst ret=[0]
2024/11/10 10:40:05     upgrade tvheadend 4.3.20240904-38 Begin /bin/rm -rf /volume2/@appstore/tvheadend
2024/11/10 10:40:07     upgrade tvheadend 4.3.20240904-38 End /bin/rm -rf /volume2/@appstore/tvheadend ret=[0]
2024/11/10 10:40:07     upgrade tvheadend 4.3.20240904-38 Begin postuninst
2024/11/10 10:40:07     Begin initialize_variables
2024/11/10 10:40:07     End initialize_variables
2024/11/10 10:40:07     ===> Step postuninst. STATUS=UPGRADE USER=tvheadend GROUP=sc-media SHARE_PATH=
2024/11/10 10:40:07     upgrade tvheadend 4.3.20240904-38 End postuninst ret=[0]
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 Begin preinst
2024/11/10 10:40:08     Begin initialize_variables
2024/11/10 10:40:08     End initialize_variables
2024/11/10 10:40:08     ===> Step preinst. STATUS=UPGRADE USER=tvheadend GROUP=sc-media SHARE_PATH=
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 End preinst ret=[0]
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 Begin /bin/rm -rf /volume2/@appstore/tvheadend
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 End /bin/rm -rf /volume2/@appstore/tvheadend ret=[0]
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 Begin /bin/mv -f /volume2/@tmp/pkginstall/package /volume2/@appstore/tvheadend
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 End /bin/mv -f /volume2/@tmp/pkginstall/package /volume2/@appstore/tvheadend ret=[0]
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 Begin /bin/mkdir -p /var/packages/tvheadend
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 End /bin/mkdir -p /var/packages/tvheadend ret=[0]
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 Begin /bin/mv -f /volume2/@tmp/pkginstall/INFO /var/packages/tvheadend/INFO
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 End /bin/mv -f /volume2/@tmp/pkginstall/INFO /var/packages/tvheadend/INFO ret=[0]
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 Begin /bin/rm -rf /var/packages/tvheadend/scripts
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 End /bin/rm -rf /var/packages/tvheadend/scripts ret=[0]
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 Begin /bin/mv -f /volume2/@tmp/pkginstall/scripts /var/packages/tvheadend/scripts
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 End /bin/mv -f /volume2/@tmp/pkginstall/scripts /var/packages/tvheadend/scripts ret=[0]
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 Begin /bin/rm -rf /var/packages/tvheadend/conf
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 End /bin/rm -rf /var/packages/tvheadend/conf ret=[0]
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 Begin /bin/mv -f /volume2/@tmp/pkginstall/conf /var/packages/tvheadend/conf
2024/11/10 10:40:08     upgrade tvheadend 4.3.20240928-40 End /bin/mv -f /volume2/@tmp/pkginstall/conf /var/packages/tvheadend/conf ret=[0]
2024/11/10 10:40:09     upgrade tvheadend 4.3.20240928-40 Begin postinst
2024/11/10 10:40:09     Begin initialize_variables
2024/11/10 10:40:09     End initialize_variables
2024/11/10 10:40:09     ===> Step postinst. STATUS=UPGRADE USER=tvheadend GROUP=sc-media SHARE_PATH=
2024/11/10 10:40:09     Begin save_wizard_variables
2024/11/10 10:40:09     End save_wizard_variables
2024/11/10 10:40:09     Begin service_postinst
2024/11/10 10:40:10     Python 3.11.10
2024/11/10 10:40:14     Default pip version 24.2
2024/11/10 10:40:53     Granting 'sc-tvheadend' unix ownership on /volume2/@appstore/tvheadend/env
2024/11/10 10:40:54     Install packages from wheels
2024/11/10 10:40:54     Install packages from wheels [/volume2/@appstore/tvheadend/share/wheelhouse/requirements.txt]
2024/11/10 10:40:56     WARNING: The directory '/volume2/@appstore/tvheadend/var/pip-cache' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
2024/11/10 10:40:57     Looking in links: /volume2/@appstore/tvheadend/share/wheelhouse
2024/11/10 10:40:58     Collecting chardet==4.0.0 (from -r /volume2/@appstore/tvheadend/share/wheelhouse/requirements.txt (line 1))
2024/11/10 10:40:58       Downloading chardet-4.0.0-py2.py3-none-any.whl.metadata (3.5 kB)
2024/11/10 10:40:59     Collecting requests==2.25.1 (from -r /volume2/@appstore/tvheadend/share/wheelhouse/requirements.txt (line 2))
2024/11/10 10:40:59       Downloading requests-2.25.1-py2.py3-none-any.whl.metadata (4.2 kB)
2024/11/10 10:41:00     Collecting urllib3==1.26.5 (from -r /volume2/@appstore/tvheadend/share/wheelhouse/requirements.txt (line 3))
2024/11/10 10:41:00       Downloading urllib3-1.26.5-py2.py3-none-any.whl.metadata (43 kB)
2024/11/10 10:41:00          ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 43.7/43.7 kB 832.7 kB/s eta 0:00:00
2024/11/10 10:41:00     Collecting idna<3,>=2.5 (from requests==2.25.1->-r /volume2/@appstore/tvheadend/share/wheelhouse/requirements.txt (line 2))
2024/11/10 10:41:00       Downloading idna-2.10-py2.py3-none-any.whl.metadata (9.1 kB)
2024/11/10 10:41:00     Collecting certifi>=2017.4.17 (from requests==2.25.1->-r /volume2/@appstore/tvheadend/share/wheelhouse/requirements.txt (line 2))
2024/11/10 10:41:00       Downloading certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB)
2024/11/10 10:41:01     Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
2024/11/10 10:41:01        ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 178.7/178.7 kB 2.8 MB/s eta 0:00:00
2024/11/10 10:41:01     Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
2024/11/10 10:41:01        ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB 8.9 MB/s eta 0:00:00
2024/11/10 10:41:01     Downloading urllib3-1.26.5-py2.py3-none-any.whl (138 kB)
2024/11/10 10:41:01        ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 138.1/138.1 kB 3.6 MB/s eta 0:00:00
2024/11/10 10:41:01     Downloading certifi-2024.8.30-py3-none-any.whl (167 kB)
2024/11/10 10:41:01        ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 167.3/167.3 kB 2.3 MB/s eta 0:00:00
2024/11/10 10:41:01     Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
2024/11/10 10:41:01        ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.8/58.8 kB 6.6 MB/s eta 0:00:00
2024/11/10 10:41:03     Installing collected packages: urllib3, idna, chardet, certifi, requests
2024/11/10 10:41:06       Attempting uninstall: certifi
2024/11/10 10:41:06         Found existing installation: certifi 2024.8.30
2024/11/10 10:41:06         Not uninstalling certifi at /volume2/@appstore/python311/lib/python3.11/site-packages, outside environment /volume2/@appstore/tvheadend/env
2024/11/10 10:41:06         Can't uninstall 'certifi'. No files were found to uninstall.
2024/11/10 10:41:07     Successfully installed certifi-2024.8.30 chardet-4.0.0 idna-2.10 requests-2.25.1 urllib3-1.26.5
2024/11/10 10:41:08     Granting 'sc-tvheadend' unix ownership on /volume2/@appstore/tvheadend/env
2024/11/10 10:41:08     Installed modules:
2024/11/10 10:41:12     certifi==2024.8.30
2024/11/10 10:41:12     chardet==4.0.0
2024/11/10 10:41:12     distlib==0.3.8
2024/11/10 10:41:12     filelock==3.16.1
2024/11/10 10:41:12     idna==2.10
2024/11/10 10:41:12     platformdirs==4.3.6
2024/11/10 10:41:12     requests==2.25.1
2024/11/10 10:41:12     six==1.16.0
2024/11/10 10:41:12     urllib3==1.26.5
2024/11/10 10:41:12     virtualenv==20.26.6
2024/11/10 10:41:12     End service_postinst
2024/11/10 10:41:12     Granting 'sc-tvheadend' unix ownership on /volume2/@appstore/tvheadend/var
2024/11/10 10:41:12     upgrade tvheadend 4.3.20240928-40 End postinst ret=[0]
2024/11/10 10:41:12     upgrade tvheadend 4.3.20240928-40 Begin postupgrade
2024/11/10 10:41:12     Begin initialize_variables
2024/11/10 10:41:12     End initialize_variables
2024/11/10 10:41:12     ===> Step postupgrade. STATUS=UPGRADE USER=tvheadend GROUP=sc-media SHARE_PATH=
2024/11/10 10:41:25     Granting 'sc-tvheadend' unix ownership on /volume2/@appstore/tvheadend/var
2024/11/10 10:41:25     Begin service_postupgrade
2024/11/10 10:41:25     Adding sc-media group permissions on recording directories:
2024/11/10 10:41:25     Done: /
2024/11/10 10:41:25     Skip granting 'sc-media' group permissions on / as the directory does not reside in '/volumeX'. Set manually if needed.
2024/11/10 10:41:25     Restore 'sc-tvheadend' unix permissions on package system directories
2024/11/10 10:41:25     Granting 'sc-tvheadend' unix ownership on /volume2/@appstore/tvheadend/var
2024/11/10 10:41:25     End service_postupgrade
2024/11/10 10:41:25     upgrade tvheadend 4.3.20240928-40 End postupgrade ret=[0]
2024/11/10 10:41:31     upgrade tvheadend 4.3.20240928-40 Begin start-stop-status start
2024/11/10 10:41:51     upgrade tvheadend 4.3.20240928-40 End start-stop-status start ret=[1]
2024/11/10 10:41:52     (system) trigger tvheadend 4.3.20240928-40 Begin start-stop-status stop
2024/11/10 10:41:52     (system) trigger tvheadend 4.3.20240928-40 End start-stop-status stop ret=[0]
2024/11/10 10:41:53     upgrade tvheadend 4.3.20240928-40 Begin /bin/rm -rf /volume2/@tmp/pkginstall
2024/11/10 10:41:53     upgrade tvheadend 4.3.20240928-40 End /bin/rm -rf /volume2/@tmp/pkginstall ret=[0]
2024/11/10 10:41:59     install tvheadend 4.3.20240928-40 Begin start-stop-status start
2024/11/10 10:42:19     install tvheadend 4.3.20240928-40 End start-stop-status start ret=[1]
2024/11/10 10:42:20     (system) trigger tvheadend 4.3.20240928-40 Begin start-stop-status stop
2024/11/10 10:42:20     (system) trigger tvheadend 4.3.20240928-40 End start-stop-status stop ret=[0]
2024/11/10 10:43:58     start tvheadend 4.3.20240928-40 Begin start-stop-status start
2024/11/10 10:44:19     start tvheadend 4.3.20240928-40 End start-stop-status start ret=[1]
2024/11/10 10:44:19     (system) trigger tvheadend 4.3.20240928-40 Begin start-stop-status stop
2024/11/10 10:44:19     (system) trigger tvheadend 4.3.20240928-40 End start-stop-status stop ret=[0]

Back to 38 is ok.

@hgy59
Copy link
Contributor Author

hgy59 commented Nov 29, 2024

I'm sorry.. i don't know if i do something wrong (or if my DSM 6.2.4 is buggy but it doesn't work

regarding the logs, it seems that the recording directory is not valid or not configured (/) but this can't be the reason for tvheadend to not start:

2024/11/10 10:41:12     ===> Step postupgrade. STATUS=UPGRADE USER=tvheadend GROUP=sc-media SHARE_PATH=
2024/11/10 10:41:25     Granting 'sc-tvheadend' unix ownership on /volume2/@appstore/tvheadend/var
2024/11/10 10:41:25     Begin service_postupgrade
2024/11/10 10:41:25     Adding sc-media group permissions on recording directories:
2024/11/10 10:41:25     Done: /
2024/11/10 10:41:25     Skip granting 'sc-media' group permissions on / as the directory does not reside in '/volumeX'. Set manually if needed.
2024/11/10 10:41:25     Restore 'sc-tvheadend' unix permissions on package system directories
2024/11/10 10:41:25     Granting 'sc-tvheadend' unix ownership on /volume2/@appstore/tvheadend/var
2024/11/10 10:41:25     End service_postupgrade

When tvheadend does not start, (install tvheadend 4.3.20240928-40 End start-stop-status start ret=[1]) we would have to look into the log file at /var/packages/tvheadend/var/tvheadend.log.
But this is not availble anymore, since you already installed revision 38 again.

Unfortunately I can't test tvheadend package on armv7 and DSM 6.2.4 (my ds-115j runs DSM 7.1.1).
And on DSM 7.1.1 the package runs as expected.

It might be an issue with your System, but I can't imagine what, since rev. 38 runs.
Alas it might be a problem with installation on /volume2.
Anyway, if someone has this issue, then can you please provide the tvheadend.log file from the var folder?

The output of synopkg status tvheadend | jq might provide additional information.

@hgy59
Copy link
Contributor Author

hgy59 commented Dec 15, 2024

Completed without solution/confirmation for #6301.

@hgy59 hgy59 merged commit 56efd95 into SynoCommunity:master Dec 15, 2024
15 checks passed
@hgy59 hgy59 deleted the fix_tvheadend branch December 15, 2024 23:01
@mreid-tt mreid-tt added the status/published Published and activated (may take up to 48h until visible in DSM package manager) label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/published Published and activated (may take up to 48h until visible in DSM package manager)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants